home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Feb 90 / MacApp.Tech$ 2⁄23⁄90 / 0715-Re(3) Undoable Cmds-Feb90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.9 KB  |  48 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  A33          to A34
  2.  
  3. Item    7153738                         19-Feb-90        01:10PST
  4.  
  5. From:   D0416                           Futuresoft System Design,PRT
  6.  
  7. To:     D5295                           Reseach SW Design, D Goldman,PRT
  8.  
  9. cc:     MACAPP.TECH$                    MacApp Technical
  10.  
  11. Sub:    Re(3) Undoable Cmds
  12.  
  13. Dave,
  14.  
  15. RE: “Thanks for the suggestions. However, I'm pretty sure that this is more or
  16. less one of the things I already tried ("Simply having TrackMouse return
  17. myCommand won't work."). Chief among the reasons it doesn't work is that you
  18. need to go through PerformCommand to set up gLastCommand and a few other
  19. things. (gLastCommand tells the undo machinery what command it's supposed to be
  20. undo/redoing.)”
  21. ------------------------------------
  22.  
  23. Actually, you (or rather MacApp) will end up going through PerformCommand, uh…
  24. eventually. It goes like this:
  25.     • You return your new undoable command in TYourControlTrackMouse.
  26.     • TYourControlTrackMouse returns the new command back to
  27. TApplication.TrackMouse which now reconizes the new command and frees the old
  28. one continuing to track using the _new_ command.
  29.     • On trackRelease phase TApplication.TrackMouse then unwinds back to
  30. TApplication.HandleMouse which unwinds to DispatchEvent returning your new
  31. command the whole way.
  32.     • Finally we unwind back to TApplication.HandleEvent (your new command
  33. still intact) which then calls the infamous PerformCommand(yourNewCmd). From
  34. here MacApp can begin the whole DoIt, UnDoIt and ReDoit stuff that it so
  35. happily wants to do. Whew!
  36.  
  37. Of course most of this, as you stated, will probably be simplified and made
  38. more flexible in MA 2.0 final so I guess I’ll just say about the above:
  39.  
  40. “Never mind”,
  41. -Ken Addison
  42.  
  43. PS: Steve F. did the most amusing description at the MA Conference about the
  44. chain of events after a mouseDown. His description was full of animation and
  45. his quick wit. It was great!
  46.  
  47.  
  48.